package com.shu.utils;

import java.sql.Connection;
import java.sql.DriverManager;

public class JdbcUtils {
	
	public static Connection getConnection(String driver,String url,String userName,String passwd) {
		try {
			Class.forName(driver).newInstance();
			return DriverManager.getConnection(url, userName, "root"); // 链接本地MYSQL
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}

}
